home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6720 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  985 b 

  1. Path: news.unt.edu!news
  2. From: Steve Fogoros <sfogoros@hsc.unt.edu>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Problem using Double
  5. Date: Sun, 18 Feb 1996 23:19:24 -0800
  6. Organization: University of North Texas Health Science Center
  7. Message-ID: <3128247C.5D11@hsc.unt.edu>
  8. References: <4g5kbd$f2j@barnacle.iol.ie>
  9. NNTP-Posting-Host: sfogoros.hsc.unt.edu
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b6a (Win16; I)
  14.  
  15. I had this problem with Borland C when I failed to include math.h and the 
  16. compiler thought sin and cos took int args and returned int. If you 
  17. pass int to a function expecting double, you can get a domain error. 
  18. You will definitly corrupt the stack frame. You must also declare a 
  19. function's return type correctly.
  20. -- 
  21. Steve Fogoros, Academic Information Coordinator
  22. University of North Texas Health Science Center
  23. 3500 Camp Bowie Boulevard, Fort Worth, Texas 76107-2699
  24. (817)-735-2162 sfogoros@hsc.unt.edu
  25.